#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main(void)
{
	int n;
	scanf("%d", &n);
	int cont = 0;
	while (n != 1) {
		if (n % 2 == 0 && n > 0) {
			n = n / 2;
			cont++;
		}
		else if (n % 2 != 0 && n > 0) {
			n = (3 * n + 1) / 2;
			cont++;
		}
	}
	printf("%d", cont);
	return 0;
}
